<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
		<script type="text/javascript">
			function Person(name,age,gender){
					this.name=name;
					this.age=age;
					this.gender=gender;
			}
			
			Person.prototype.toString=function(){
				return "Person[name="+this.name+",age="+this.age+",gender="+this.gender+"]";
			};
			
			var per1=new Person("孙悟空",22,"男");
			var per2=new Person("如来佛祖",55,"男");
			var per3=new Person("蜘蛛精",18,"女");
			console.log(per1);
			console.log(per2);
			console.log(per3);
		</script>
	</head>
	<body>
	</body>
</html>
